]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
perf-tool: Add --hotplug option
authorJonas Ådahl <jadahl@gmail.com>
Thu, 2 Feb 2023 15:04:10 +0000 (16:04 +0100)
committerMarge Bot <marge-bot@gnome.org>
Mon, 6 Feb 2023 18:10:01 +0000 (18:10 +0000)
The --hotplug option works together with --headless and makes the perf
tool not add a persistant virtual monitor, allowing the perf test
themselves able to handle monitors.

This is needed for hotplug tests.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2623>

src/gnome-shell-perf-tool.in

index 173aa98e446e030308297d0cff2a7ca90a883da8..6f5273c505c0b42e0859f576662eba3da01c49ee 100755 (executable)
@@ -56,8 +56,9 @@ def start_shell(wrap=None, perf_output=None):
             args.append('--nested')
         elif options.headless:
             args.append('--headless')
-            args.append('--virtual-monitor')
-            args.append('1280x720')
+            if not options.hotplug:
+                args.append('--virtual-monitor')
+                args.append('1280x720')
         else:
             args.append('--display-server')
         args.append('--wayland-display')
@@ -315,6 +316,8 @@ parser.add_argument("-x", "--x11", action="store_true",
                     help="Run as an X11 compositor")
 parser.add_argument("--headless", action="store_true",
                     help="Run as a headless Wayland compositor")
+parser.add_argument("--hotplug", action="store_true",
+                    help="Start without a virtual monitor attached")
 
 options = parser.parse_args()